package com.zwl.swagger;

import com.zwl.swagger.comment.Comment;
import com.zwl.swagger.comment.MethodComment;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.Map;

/**
 * 注释内容
 * @author zhangweilin
 * @Description:
 * @date 2021年08月20日 22:53
 */
@Component
public class CommentContainer {

    static Comment COMMENT = new Comment();

    public Map<String, String> getClassCommentMap() {
//        return ImmutableMap.copyOf(COMMENT.getClassCommentMap());
        return Collections.unmodifiableMap(COMMENT.getClassCommentMap());
    }

    public Map<String, MethodComment> getMethodCommentMap() {
        return Collections.unmodifiableMap(COMMENT.getMethodCommentMap());
//        return ImmutableMap.copyOf(COMMENT.getMethodCommentMap());
    }

    public Map<String, String> getFieldCommentMap() {
        return Collections.unmodifiableMap(COMMENT.getFieldCommentMap());
//        return ImmutableMap.copyOf(COMMENT.getFieldCommentMap());
    }

}
